<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title th:text="${res.title}"></title>
    <link type="favicon" rel="shortcut icon" th:href="@{/img/pns.png}">
    <link rel="stylesheet" th:href="@{/css/main.css}">
    <link rel="stylesheet" th:href="@{/css/article.css}">
    <link rel="stylesheet" th:href="@{/css/res.css}">
    <!-- 引入Font Awesome图标  -->
    <link rel="stylesheet" th:href="@{/font-awesome/css/font-awesome.min.css}">
    <!-- 引入Jquery  -->
    <script src="https://lib.sinaapp.com/js/jquery/2.0.2/jquery-2.0.2.min.js"></script>
    <!-- 引入Layui.css -->
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <!-- 引入Layui.js -->
    <script th:src="@{/layui/layui.js}"></script>
    <script th:src="@{/js/commen.js}"></script>
    <script th:src="@{/js/res.js}"></script>
</head>
<body>
<div class="toolbar">
    <div class="layui-container">
        <div class="layui-row">
            <div class="toolbar-container-left layui-col-md4">
                <div class="toolbar-logo">
                    <img th:src="@{/img/logo.png}" title="网站首页">
                </div>
                <div class="toolbar-menus">
                    <ul>
                        <li><a th:href="@{/}" title="网站首页">首页</a></li>
                        <li><a th:href="@{/resources}" title="编程资源">资源</a></li>
<!--                        <li><a href="index.html" title="世界">世界</a></li>-->
                        <li><a th:href="@{/rank}" title="全站热门内容">排行</a></li>
                    </ul>
                </div>
            </div>
            <div class="toolbar-container-middle layui-col-md4">
                <form action="/search" method="POSt" class="layui-form">
                    <input id="Search" type="text" name="key" required lay-verify="required" placeholder="请输入关键字搜索"
                           autocomplete="off" list="searchList" class="layui-input search-input">
                    <button type="button" class="layui-btn search">搜索</button>
                </form>
            </div>
            <div class="toolbar-container-right layui-col-md4">
                <ul class="layui-nav">
                    <li class="layui-nav-item create">
                        <a href=""><i class="el-icon-circle-plus"></i>&nbsp;创作</a>
                        <dl class="layui-nav-child">
                            <dd><a th:href="@{/article/write}"><i class="layui-icon layui-icon-edit"></i>&nbsp;写文章</a></dd>
                            <dd><a th:href="@{/resource/add}"><i class="el-icon-upload"></i>&nbsp;上传资源</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item message">
                        <a href=""><i class="layui-icon layui-icon-notice"></i>消息
                            <!--                            <span class="layui-badge">9</span>-->
                        </a>
                    </li>
                    <li class="layui-nav-item account">
                        <a href=""><img th:src="@{/img/head.png}" class="layui-nav-img">我</a>
                        <dl class="layui-nav-child">
                            <dd><a th:href="@{/user/account/account}" target="_blank"><i class="fa fa-universal-access"
                                                                                         aria-hidden="true"></i>&nbsp;账号管理</a></dd>
                            <dd><a th:href="@{/user/account/article}" target="_blank"><i class="fa fa-arrows-alt"></i>&nbsp;我的博客</a>
                            </dd>
                            <dd><a th:href="@{/user/account/res/}" target="_blank"><i class="fa fa-database"></i>&nbsp;我的分享</a></dd>
                            <dd><a th:href="@{/user/logout}"><i class="fa fa-sign-out"
                                                                aria-hidden="true"></i>&nbsp;退出</a></dd>
                        </dl>
                    </li>
                    <li class="LoginAndRegister">
                        <a th:href="@{/user/login}">登录</a>&nbsp;/&nbsp;<a th:href="@{/user/register}">注册</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>

<div class="home layui-col-md12">
    <div class="layui-container">
        <div class="article-content layui-col-md9">
            <ul class="list">
                <li>
                    <input th:value="${res.id}" style="display: none" id="resourceId"></input>
                </li>
                <li class="resLogo">
                    <img th:src="${res.icon}">
                </li>
                <li class="resLogo">
                    <span class="resName" th:text="${res.title}"></span>
                </li>
                <li>
                    <span class="resLeft">简&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;介:</span>
                    <span class="resRight" th:text="${res.content}"></span>
                </li>
                <li>
                    <span class="resLeft">标&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;签:</span>
                    <span class="resRight" th:text="${res.type}"></span>
                </li>
                <li>
                    <span class="resLeft">链&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;接:</span>
                    <a th:href="${res.link}" target="_blank"><span class="resRight">点我访问或下载资源</span></a>
                </li>
                <li>
                    <span class="resLeft">发布时间:</span>
                    <span class="resRight" th:text="${date}"></span>
                </li>
                <li>
                    <span class="resLeft">访&nbsp;&nbsp;问&nbsp;量:</span>
                    <span class="resRight authorName" th:text="${res.readNum}"></span>
                </li>
                <li>
                    <span class="resLeft">发&nbsp;&nbsp;布&nbsp;者:</span>
                    <a th:href="@{'/user/'+${author.id}}" target="_blank">
                        <span class="resRight authorName" th:text="${author.username}"></span>
                    </a>
                </li>
                <li>
                    <span class="resLeft">发&nbsp;&nbsp;布&nbsp;于 :</span>
                    <span class="resRight authorName" th:text="${res.ipAddr}"></span>
                </li>
            </ul>

            <div class="comment layui-col-md12">
                <div class="comment_input  layui-col-md12">
                    <div class="comment_author_logo layui-col-md1 layui-form">
                        <a href=""><img src="" alt=""></a>
                    </div>
                    <div class="comment_content">
                        <div class="layui-input-block">
                             <textarea name="comment" id="comment" placeholder="提问和评论都可以，用心的回复会被更多人看到和认可"
                                       class="layui-textarea"></textarea>
                        </div>
                        <button class="layui-btn comment_submit_btn">立即提交</button>
                    </div>
                </div>
                <div class=" layui-col-md12 comment-num">
                    <span class="quanbupinglun">全部评论</span>
                    <span class="comment_number"></span>
                </div>
                <div class="comment_list layui-col-md12">
                    <ul>

                    </ul>
                </div>
            </div>

        </div>
        <div class="home-right layui-col-md3">
            <div class="author layui-col-md12">
                <div class="layui-col-md12">
                    <a class="articleAuthorLink" th:href="@{'/user/'+${author.id}}" target="_blank">
                        <img class="articleAuthorLogo" th:src="${author.photo}"></a>
                    <br><br><a class="articleAuthorLink" th:href="@{'/user/'+${author.id}}" target="_blank">
                    <span class="authorName" th:text="${author.username}"></span></a><br>
                    <span class="geyan" th:text="${author.signature}"></span><br>文章 :
                    <span>23</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;资源:<span>22</span>
                </div>
            </div>
            <div class="mark layui-col-md12">
                <div class="mark-title layui-col-md12">
                    <h3>积分排行</h3>
                    <a th:href="@{/rank}">更多<i class="layui-icon layui-icon-right"></i></a>
                </div>
                <div class="mark-list layui-col-md12">
                    <ul class="layui-col-md12 userRank">

                    </ul>
                </div>
            </div>

            <div class="hot-article layui-col-md12">
                <div class="hot-title layui-col-md12">
                    <h3>热门文章</h3>
                    <a th:href="@{/rank}">更多<i class="layui-icon layui-icon-right"></i></a>
                </div>
                <div class="hot-list layui-col-md12">
                    <ul class="layui-col-md12 articleRank">

                    </ul>
                </div>
            </div>
            <div class="hot-article layui-col-md12">
                <div class="hot-title layui-col-md12">
                    <h3>热门编程资源</h3>
                    <a th:href="@{/rank}">更多<i class="layui-icon layui-icon-right"></i></a>
                </div>
                <div class="hot-list layui-col-md12">
                    <ul class="layui-col-md12 ResRank">

                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="footer layui-col-md12">
    Copyright © 2022 编程导航. All Rights Reserved MIT Licensed
</div>
<div class="toTop">
    <span id="toTopTitle">返回<br>顶部</span>
    <i class="layui-icon layui-icon-top"></i>
</div>
</body>
</html>